#include "PrecisionConvertor.h"
#include <cmath>

double PrecisionConvertor::getResult(double value, unsigned int precision, bool isRound)
{
    unsigned int base = pow(10, precision);
    double tempValue = value * base;

    return (isRound ? (round(tempValue) / base) : (floor(tempValue) / base));
}


